package com.weiqk.pmdemo.dao;

import com.weiqk.pmdemo.pojo.Dic;
import com.weiqk.pmdemo.pojo.Project;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProjectRepository extends PagingAndSortingRepository<Project,Integer> {
    //通过id查找project
    @Query(value = "select * FROM PM_PROJECT where PROJECT_ID=:n",nativeQuery = true)
    Project findOneById(@Param("n") int id);

}
